package com.GGG.cloud.house.agent.service.impl;

import com.GGG.cloud.house.agent.domain.entity.User;
import com.GGG.cloud.house.agent.mapper.UserMapper;
import com.GGG.cloud.house.agent.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * TODO
 *
 * @ClassName UserServiceImpl
 * @Author Wing
 * @Date 2020/10/5 17:23
 * @Version 1.0
 * @Remarks TODO
 */
@Service
@Transactional(readOnly = true, timeout = 5, rollbackFor = {Exception.class})
public class UserServiceImpl extends BaseServiceImpl<User,Long, UserMapper> implements UserService {

    @Override
    public List<User> selectUserInId(List<Long> ids) {
        Example example = new Example(User.class);

        Example.Criteria criteria = example.createCriteria();

        criteria.andIn("id",ids);

        return baseMapper.selectByExample(example);
    }
}
